#!/usr/bin/python


"""
Compile .py file to .pyc file to current directory

        compile_pyc.py <example.py>
"""


__version__ = '$Rev$'
__author__ = 'wli@synopsys.com'


import sys
import getopt
import py_compile;    


if __name__ != "__main__":
    sys.exit(0);


opts, args  = getopt.getopt(sys.argv[1:], "h", ["help"])
for o, a in opts:
    if o in ("-h", "--help"):
        print __doc__
        sys.exit(0)

if len(args)  != 1:
    print __doc__
    sys.exit(1)


file = args[0]
py_compile.compile(file); 
sys.exit(0)
